<form ng-submit="vm.submit()" class="ForgotPassword-form" name="vm.forgotPasswordForm" novalidate>
  <div class="callout callout-danger" ng-if="vm.errorTrigger">
    <h4>Error:</h4>
    <p>Please check your email and try again.</p>
  </div>
  <div class="form-group has-feedback" ng-class="{ 'has-error': vm.forgotPasswordForm.email.$invalid && ( vm.formSubmitted || vm.forgotPasswordForm.email.$touched) }">
    <input type="email" class="form-control" placeholder="Please enter your email address" name="email" ng-model="vm.email" ng-required="true" ng-pattern="/^[^\s@]+@[^\s@]+\.[^\s@]{2,}$/">
    <span class="glyphicon glyphicon-envelope form-control-feedback"></span>
    <p ng-show="vm.forgotPasswordForm.email.$error.email  && ( vm.formSubmitted || vm.forgotPasswordForm.email.$touched)" class="help-block">This is not a valid email</p>
    <p ng-show="vm.forgotPasswordForm.email.$error.required && ( vm.formSubmitted || vm.forgotPasswordForm.email.$touched)" class="help-block">Email is required.</p>
  </div>
  <div class="row">
    <div class="col-xs-12">
      <button type="submit" class="btn btn-primary btn-block btn-flat">
        Submit
      </button>
    </div>
  </div>
</form>
